

********************************************************************************		
	clear all
	set maxvar 32767

/*	set directories————Liu Huidi  */	
	global dtadir ""
	global workingdata ""
	global results ""
		
********************************************************************************		
	use $dtadir/figures.dta, clear

	drop in 4	

	reshape long x, i(n) j(type)
	label define ltype 1 "x1" 2 "x2" 3 "k" 4 "c" 5 "d"
	label value type ltype



********************************************************************************		
*******************************row name add later*******************************		
********************************************************************************		

*********************Table 2 - panel 1*********************************		
	twoway (line y x if n == 13 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 14 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 15 & (type == 1 | type == 2), lcolor(gray)) ///
		   (scatter y x if n > 12 & n < 16 & (type == 3), mlabel(type) mlabsize(medsmall) mlabp(1) mlabc(red) msize(medlarge) msymbol(circle) mcolor(red)) ///
		   (scatter y x if n > 12 & n < 16 & (type == 4), mlabel(type) mlabsize(medsmall) mlabp(1) mlabc(blue) msize(medium) msymbol(diamond) mcolor(blue)) ///
		   (scatter y x if n > 12 & n < 16 & (type == 5), mlabel(type) mlabsize(medsmall) mlabp(5) mlabc(green) msize(medlarge) msymbol(triangle) mcolor(green)) ///
		   (scatter y x if n > 12 & n < 16 & (type == 2), mlabel(p2) mlabsize(medsmall) mlabp(11) mlabc(black) msymbol(none) mcolor(gray)) ///
		   , xtitle("") ytitle("") ylabel(none) ysc(axis(1) noline) yscale(range(0/8)) ///
		     xline(0, lcolor(black)) ///
		     text(-0.65 104.5 "%") ///
		     legend(cols(3) label(4 "know") label(5 "can") label(6 "do") order(4  5  6) ) 

	graph save figure2_1,replace

*********************Table 2 - panel 2*********************************		
	twoway (line y x if n == 16 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 17 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 18 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 19 & (type == 1 | type == 2), lcolor(gray)) ///
		   (scatter y x if n > 15 & (type == 3), mlabel(type) mlabsize(medsmall) mlabp(1) mlabc(red) msize(medlarge) msymbol(circle) mcolor(red)) ///
		   (scatter y x if n > 15 & (type == 4), mlabel(type) mlabsize(medsmall) mlabp(1) mlabc(blue) msize(medium) msymbol(diamond) mcolor(blue)) ///
		   (scatter y x if n > 15 & (type == 5), mlabel(type) mlabsize(medsmall) mlabp(5) mlabc(green) msize(medlarge) msymbol(triangle) mcolor(green)) ///
		   (scatter y x if n > 15 & (type == 2), mlabel(p2) mlabsize(medsmall) mlabp(11) mlabc(black) msymbol(none) mcolor(gray)) ///
		   , xtitle("") ytitle("") ylabel(none) ysc(axis(1) noline) yscale(range(0/8)) ///
		     xline(0, lcolor(black)) ///
		     legend(cols(3) label(5 "know") label(6 "can") label(7 "do") order(5  6  7) ) 

	graph save figure2_2,replace

*********************Table 3 - panel 1*********************************		
	twoway (line y x if n == 1 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 2 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 3 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 5 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 6 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 7 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 8 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 9 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 10 & (type == 1 | type == 2), lcolor(gray)) ///
		   (line y x if n == 11 & (type == 1 | type == 2), lcolor(gray)) ///
		   (scatter y x if n < 13 & n != 4 & (type == 3), mlabel(type) mlabp(5) mlabsize(vsmall) mlabc(red) msize(medsmall) msymbol(circle) mcolor(red)) ///
		   (scatter y x if n < 13 & n != 4 & (type == 4), mlabel(type) mlabp(1) mlabsize(vsmall) mlabc(blue) msize(small) msymbol(diamond) mcolor(blue)) ///
		   (scatter y x if n < 13 & n != 4 & (type == 5), mlabel(type) mlabp(5) mlabsize(vsmall) mlabc(green) msize(medsmall) msymbol(triangle) mcolor(green)) ///
		   (scatter y x if n < 13 & n != 4 & (type == 2), mlabel(p2) mlabp(11) mlabsize(vsmall) mlabc(black) msymbol(none) mcolor(gray)) ///
		   , xtitle("") xlabel(,labsize(small)) ytitle("") ylabel(none) ysc(axis(1) noline) yscale(range(0/12)) ///
		     xline(0, lcolor(black)) ///
		     legend(cols(3) label(11 "know") label(12 "can") label(13 "do") order(11  12  13)) ///
		     text(-1.25 104 "%") 


	graph save figure3,replace
